package cn.bdqn.hospital.dao;

import cn.bdqn.hospital.entity.Department;

import java.sql.SQLException;
import java.util.List;

public interface DepartmentDao {
    /**
     * 新增科室
     * @param department
     * @return
     * @throws SQLException
     */
    public int add (Department department) throws SQLException;

    /**
     * 修改科室
     * @param department
     * @return
     * @throws SQLException
     */
    public int update(Department department) throws SQLException;

    /**
     * 通过科室id删除科室
     * @param ksid
     * @return
     * @throws SQLException
     */
    public int deleteByKsid(Integer ksid) throws SQLException;

    /**
     * 查询科室
     * @return
     * @throws SQLException
     */
    public List<Department> getDepartmentall() throws SQLException;

    /**
     * 通过科室id查询科室
     * @param ksid
     * @return
     * @throws SQLException
     */
    public Department findDepartmentByKsid(Integer ksid) throws SQLException;
}
